$OpenBSD: patch-CMakeLists_txt,v 1.3 2017/04/05 08:02:05 kirby Exp $
--- CMakeLists.txt.orig	Tue Mar 28 19:32:09 2017
+++ CMakeLists.txt	Wed Mar 29 12:21:31 2017
@@ -22,6 +22,9 @@ option (MYSQL_TESTING "Enable testing of MySQL SMSD ba
 option (ODBC_TESTING "Enable testing of ODBC MySQL SMSD backend" OFF)
 option (BUILD_SHARED_LIBS "Build shared libraries" ON)
 
+option (MYSQL_BACKEND "Enable MySQL SMSD backend" OFF)
+option (PSQL_BACKEND "Enable PostgreSQL SMSD backend" OFF)
+
 option (LARGE_FILES "Support for large files" ON)
 if (LARGE_FILES)
     add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64)
@@ -116,7 +119,6 @@ endif (ENABLE_GETOPT)
 check_symbol_exists (daemon "unistd.h" HAVE_DAEMON_UNISTD)
 check_symbol_exists (daemon "stdlib.h" HAVE_DAEMON_STDLIB)
 check_symbol_exists (kill "signal.h" HAVE_KILL)
-check_symbol_exists (sigtimedwait "signal.h" HAVE_SIGTIMEDWAIT)
 check_symbol_exists (getpwnam "pwd.h" HAVE_GETPWNAM)
 check_symbol_exists (getgrnam "grp.h" HAVE_GETGRNAM)
 check_symbol_exists (getpwuid "pwd.h" HAVE_GETPWUID)
@@ -183,9 +185,12 @@ find_package (Threads)
 find_package(PythonInterp 2)
 
 # Packages in sources
-macro_optional_find_package (MySQL)
-macro_optional_find_package (ODBC)
-macro_optional_find_package (Postgres)
+if (MYSQL_BACKEND)
+   find_package (MySQL)
+endif (MYSQL_BACKEND)
+if (PSQL_BACKEND)
+   find_package (Postgres)
+endif (PSQL_BACKEND)
 macro_optional_find_package (LibDBI)
 macro_optional_find_package (Libintl)
 macro_optional_find_package (Iconv)
@@ -474,7 +479,6 @@ if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_MINGW 
     MACRO_TUNE_COMPILER("-Wno-pointer-sign")
 
     MACRO_TUNE_COMPILER("-Wwrite-strings")
-    MACRO_TUNE_COMPILER("-Wredundant-decls")
     if (DEBUG)
         MACRO_TUNE_COMPILER("-fstrict-aliasing")
     endif (DEBUG)
